Martin Egge says that Compegps prefers replacing spaces in names
authorRobert Lipe <robertlipe@gpsbabel.org>
Mon, 22 Aug 2016 17:08:49 +0000 (12:08 -0500)
committerRobert Lipe <robertlipe@gpsbabel.org>
Mon, 22 Aug 2016 17:08:49 +0000 (12:08 -0500)
with underscores instead of deleting them. Done.

compegps.cc

index d7422131e73629112290fb9ef0276d8a843b837d..121bc8e0e05d0214b80f901f5941ce911031d8f6 100644 (file)
@@ -484,7 +484,12 @@ write_waypt_cb(const Waypoint* wpt)
   if (curr_index != target_index) {
     return;
   }
-  name = (snlen > 0) ? mkshort_from_wpt(sh, wpt) : csv_stringclean(wpt->shortname, " ");
+
+  // Our only output cleansing is to replace
+  QString cleaned_name(wpt->shortname);
+  cleaned_name.replace(' ', '_');
+
+  name = (snlen > 0) ? mkshort(sh, cleaned_name) : cleaned_name;
 
   gbfprintf(fout, "W  %s A ", CSTR(name));
   gbfprintf(fout, "%.10f%c%c ",